searchbar: Add an element name to the css node
authorMatthias Clasen <mclasen@redhat.com>
Thu, 29 Oct 2015 11:43:30 +0000 (07:43 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 29 Oct 2015 11:43:30 +0000 (07:43 -0400)
This lets us avoid hardcoding the type in CSS.

gtk/gtksearchbar.c

index 97d48d153a695a6ae8b5be92638541e9758fb706..8833fee399dadeb02d99ba5a5532de4130e86f3a 100644 (file)
  * The following example shows you how to create a more complex search
  * entry.
  *
+ * # CSS nodes
+ *
+ * GtkSearchBar has a single CSS node with name searchbar.
+ *
  * ## Creating a search bar
  *
  * [A simple example](https://git.gnome.org/browse/gtk+/tree/examples/search-bar.c)
@@ -421,6 +425,8 @@ gtk_search_bar_class_init (GtkSearchBarClass *klass)
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkSearchBar, revealer);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkSearchBar, box_center);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkSearchBar, close_button);
+
+  gtk_widget_class_set_css_name (widget_class, "searchbar");
 }
 
 static void